<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Object composition</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Object_composition"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.pygments.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Object_composition rootpage-Object_composition skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Object composition</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<p class="mw-empty-elt">
</p>
<style data-mw-deduplicate="TemplateStyles:r1236090951">
/* start https://en.wikipedia.org/ */
.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}
/* end https://en.wikipedia.org/ */
</style><div role="note" class="hatnote navigation-not-searchable">Not to be confused with <a href="Function_composition_(computer_science)" title="Function composition (computer science)">function composition (computer science)</a>.</div>
<style data-mw-deduplicate="TemplateStyles:r1251242444">
/* start https://en.wikipedia.org/ */
.mw-parser-output .ambox{border:1px solid #a2a9b1;border-left:10px solid #36c;background-color:#fbfbfb;box-sizing:border-box}.mw-parser-output .ambox+link+.ambox,.mw-parser-output .ambox+link+style+.ambox,.mw-parser-output .ambox+link+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+style+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+link+.ambox{margin-top:-1px}html body.mediawiki .mw-parser-output .ambox.mbox-small-left{margin:4px 1em 4px 0;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}.mw-parser-output .ambox-speedy{border-left:10px solid #b32424;background-color:#fee7e6}.mw-parser-output .ambox-delete{border-left:10px solid #b32424}.mw-parser-output .ambox-content{border-left:10px solid #f28500}.mw-parser-output .ambox-style{border-left:10px solid #fc3}.mw-parser-output .ambox-move{border-left:10px solid #9932cc}.mw-parser-output .ambox-protection{border-left:10px solid #a2a9b1}.mw-parser-output .ambox .mbox-text{border:none;padding:0.25em 0.5em;width:100%}.mw-parser-output .ambox .mbox-image{border:none;padding:2px 0 2px 0.5em;text-align:center}.mw-parser-output .ambox .mbox-imageright{border:none;padding:2px 0.5em 2px 0;text-align:center}.mw-parser-output .ambox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ambox .mbox-image-div{width:52px}@media(min-width:720px){.mw-parser-output .ambox{margin:0 10%}}@media print{body.ns-0 .mw-parser-output .ambox{display:none!important}}
/* end https://en.wikipedia.org/ */
</style>
<p>In <a href="Computer_science" title="Computer science">computer science</a>, <b>object composition</b> and <b>object aggregation</b> are closely related ways to combine <a href="Object_(computer_science)" title="Object (computer science)">objects</a> or <a href="Data_type" title="Data type">data types</a> into more complex ones. In conversation, the distinction between composition and aggregation is often ignored.<sup id="cite_ref-Yaiser_1-0" class="reference"><a href="#cite_note-Yaiser-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> Common kinds of compositions are <a href="Object_(computer_science)" title="Object (computer science)">objects</a> used in <a href="Object-oriented_programming" title="Object-oriented programming">object-oriented programming</a>, <a href="Tagged_union" title="Tagged union">tagged unions</a>, <a href="Set_(abstract_data_type)" title="Set (abstract data type)">sets</a>, <a href="Sequence" title="Sequence">sequences</a>, and various <a href="Graph_(abstract_data_type)" title="Graph (abstract data type)">graph</a> structures. Object compositions relate to, but are not the same as, data structures.
</p><p>Object composition refers to the logical or conceptual structure of the information, not the implementation or physical <a href="Data_structure" title="Data structure">data structure</a> used to represent it. For example, a <b>sequence</b> differs from a <b>set</b> because (among other things) the order of the composed items matters for the former but not the latter. Data structures such as <a href="Arrays" class="mw-redirect" title="Arrays">arrays</a>, <a href="Linked_lists" class="mw-redirect" title="Linked lists">linked lists</a>, <a href="Hash_tables" class="mw-redirect" title="Hash tables">hash tables</a>, and many others can be used to implement either of them. Perhaps confusingly, some of the same terms are used for both data structures and composites. For example, "<a href="Binary_tree" title="Binary tree">binary tree</a>" can refer to either: as a data structure it is a means of accessing a linear sequence of items, and the actual positions of items in the tree are irrelevant (the tree can be internally rearranged however one likes, without changing its meaning). However, as an object composition, the positions are relevant, and changing them would change the meaning (as for example in <a href="Cladogram" title="Cladogram">cladograms</a>).
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="Programming_technique">Programming technique</h2></div>
<p><a href="Object-oriented_programming" title="Object-oriented programming">Object-oriented programming</a> is based on using <a href="Object_(computer_science)" title="Object (computer science)">objects</a> to <a href="Encapsulation_(computer_programming)" title="Encapsulation (computer programming)">encapsulate</a> data and behavior. It uses two main techniques for assembling and composing functionality into more complex ones, sub-typing and object composition.<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> Object composition is about combining objects within compound objects, and at the same time, ensuring the encapsulation of each object by using their well-defined <a href="Interface_(object-oriented_programming)" title="Interface (object-oriented programming)">interface</a> without visibility of their internals. In this regard, object composition differs from data structures, which do not enforce encapsulation.
</p><p>Object composition may also be about a group of multiple related objects, such as a set or a sequence of objects. <a href="Delegation_(object-oriented_programming)" title="Delegation (object-oriented programming)">Delegation</a> may enrich composition by forwarding requests or calls made to the enclosing composite object to one of its internal components.<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup>
</p><p>In <a href="Class_(computer_programming)" title="Class (computer programming)">class</a>-based and <a href="Strong_and_weak_typing" title="Strong and weak typing">typed</a> programming languages, types can be divided into composite and non-composite types, and composition can be regarded as a relationship between types: an object of a composite type (e.g. <i>car</i>) "<a href="Has-a" title="Has-a">has</a>" objects of other types (e.g. <i>wheel</i>). When a composite object contains several sub-objects of the same type, they may be assigned to particular <a href="Role" title="Role">roles</a>, often distinguished by names or numbers. For example, a <b>Point</b> object might contain 3 numbers, each representing distance along a different axis, such as 'x', 'y', and 'z'. The study of part-whole relationships in general, is <a href="Mereology" title="Mereology">mereology</a>.
</p><p>Composition must be distinguished from <a href="Subtyping" title="Subtyping">subtyping</a>, which is the process of adding detail to a general data type to create a more specific data type. For instance, cars may be a specific type of vehicle: <i>car</i> <a href="Is-a" title="Is-a">is a</a> <i>vehicle</i>. Subtyping doesn't describe a relationship between different objects, but instead, says that objects of a type are simultaneously objects of another type. The study of such relationships is <a href="Ontology" title="Ontology">ontology</a>.
</p><p>In <a href="Prototype-based_programming" title="Prototype-based programming">prototype</a>-based programming languages such as <a href="JavaScript" title="JavaScript">JavaScript</a>, objects can dynamically inherit the behaviors from a prototype object at the moment of their instantiation. Composition must be distinguished from prototyping: the newly instantiated object inherits the composition of its prototype, but it may itself be composed on its own.
</p><p>Composite objects may be represented in storage by co-locating the composed objects, by co-locating references, or in many other ways. The items within a composite object may be referred to as <i>attributes</i>, <i><a href="Field_(computer_science)" title="Field (computer science)">fields</a></i>, <i>members</i>, <i>properties</i>, or other names, and the resulting composition as <i><a href="Composite_type" class="mw-redirect" title="Composite type">composite type</a></i>, <i><a href="Storage_record" title="Storage record">storage record</a></i>, <i>structure</i>, <i><a href="Tuple" title="Tuple">tuple</a></i>, or a <i>user-defined type (UDT)</i>. For details, see the <a href="#Aggregation">aggregation</a> section below.
</p>
<div class="mw-heading mw-heading2"><h2 id="UML_modeling_technique">UML modeling technique</h2></div>
<p>In <a href="Unified_Modeling_Language" title="Unified Modeling Language">UML</a> modeling, objects can be conceptually composed, independently of the implementation with a programming language. There are four ways of composing objects in UML: property, association, aggregation and composition:<sup id="cite_ref-:0_4-0" class="reference"><a href="#cite_note-:0-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup>
</p>
<ul><li>A property represents an attribute of the class.</li>
<li>An association represents a <a href="Semantic_relationship" class="mw-redirect" title="Semantic relationship">semantic relationship</a> between instances of the associated classes. The member-end of an association corresponds to a property of the associated class.</li>
<li>An aggregation is a kind of association that models a part/whole relationship between an aggregate (whole) and a group of related components (parts).</li>
<li>A composition, also called a composite aggregation, is a kind of aggregation that models a part/whole relationship between a composite (whole) and a group of exclusively owned parts.</li></ul>
<p>The relationship between the aggregate and its components is a weak "has-a" relationship: The components may be part of several aggregates, may be accessed through other objects without going through the aggregate, and may outlive the aggregate object.<sup id="cite_ref-:0_4-1" class="reference"><a href="#cite_note-:0-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup> The state of the component object still forms part of the aggregate object.
</p><p>The relationship between the composite and its parts is a strong “has-a” relationship: The composite object has sole "<i>responsibility for the existence and storage of the composed objects</i>", the composed object can be part of at most one composite, and "<i>If a composite object is deleted, all of its part instances that are objects are deleted with it</i>". Thus in UML, composition has a more narrow meaning than the usual object composition.
</p>
<p>The graphical notation represents:
</p>
<ul><li>the property as a typed element in the box of the enclosing class,</li>
<li>the association as a plain line between the associated classes,</li>
<li>the <a class="mw-selflink-fragment" href="#Aggregation">aggregation</a> as an unfilled diamond on the side of the aggregate and a solid line,</li></ul>
<ul><li>the composition as a filled diamond on the side of the composite and a solid line.</li></ul>
<div class="mw-heading mw-heading2"><h2 id="Aggregation">Aggregation</h2></div>
<p>Aggregation differs from ordinary composition in that it does not imply ownership. In composition, when the owning object is destroyed, so are the contained objects. In aggregation, this is not necessarily true. For example, a <a href="University" title="University">university</a> owns various departments (e.g., <a href="Chemistry" title="Chemistry">chemistry</a>), and each department has a number of professors. If the university closes, the departments will no longer exist, but the professors in those departments will continue to exist. Therefore, a university can be seen as a composition of departments, whereas departments have an aggregation of professors. In addition, a professor could work in more than one department, but a department could not be part of more than one university.
</p><p>Composition is usually implemented such that an object contains another object. For example, in <a href="C%2B%2B" title="C++">C++</a>:
</p>
<div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span class="k">import</span><span class="w"> </span><span class="n">std</span><span class="p">;</span>
<span class="k">class</span><span class="w"> </span><span class="nc">Professor</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="c1">// ...</span>
<span class="p">};</span>
<span class="k">class</span><span class="w"> </span><span class="nc">Department</span><span class="w"> </span><span class="p">{</span>
<span class="k">private</span><span class="o">:</span>
<span class="w"> </span><span class="c1">// Aggregation: |Professors| may outlive the |Department|.</span>
<span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">std</span><span class="o">::</span><span class="n">weak_ptr</span><span class="o"><</span><span class="n">Professor</span><span class="o">>></span><span class="w"> </span><span class="n">members</span><span class="p">;</span>
<span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="w"> </span><span class="n">title</span><span class="p">;</span>
<span class="k">public</span><span class="o">:</span>
<span class="w"> </span><span class="n">Department</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">&</span><span class="w"> </span><span class="n">title</span><span class="p">)</span><span class="o">:</span><span class="w"> </span>
<span class="w"> </span><span class="n">title</span><span class="p">{</span><span class="n">title</span><span class="p">}</span><span class="w"> </span><span class="p">{}</span>
<span class="p">};</span>
<span class="k">class</span><span class="w"> </span><span class="nc">University</span><span class="w"> </span><span class="p">{</span>
<span class="k">private</span><span class="o">:</span>
<span class="w"> </span><span class="c1">// Composition: |Department|s exist only as long as the faculty exists.</span>
<span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">Department</span><span class="o">></span><span class="w"> </span><span class="n">faculty</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="n">Department</span><span class="p">(</span><span class="s">"Chemistry"</span><span class="p">),</span>
<span class="w"> </span><span class="n">Department</span><span class="p">(</span><span class="s">"Physics"</span><span class="p">),</span>
<span class="w"> </span><span class="n">Department</span><span class="p">(</span><span class="s">"Arts"</span><span class="p">),</span>
<span class="w"> </span><span class="c1">// more departments here...</span>
<span class="w"> </span><span class="p">};</span>
<span class="k">public</span><span class="o">:</span>
<span class="w"> </span><span class="n">University</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">default</span><span class="p">;</span>
<span class="p">};</span>
</pre></div>
<p>In aggregation, the object may only contain a reference or pointer to the object (and not have <a href="Object_lifetime" title="Object lifetime">lifetime</a> responsibility for it).
</p><p>Sometimes aggregation is referred to as composition when the distinction between ordinary composition and aggregation is unimportant.
</p><p>The above code would transform into the following UML Class diagram:
</p><p><span typeof="mw:File"></span>
</p>
<div class="mw-heading mw-heading3"><h3 id="Aggregation_in_COM">Aggregation in COM</h3></div>
<p>In Microsoft's <a href="Component_Object_Model" title="Component Object Model">Component Object Model</a>, aggregation means that an object exports, as if it were their owner, one or several <a href="Interface_(computer_science)" class="mw-redirect" title="Interface (computer science)">interfaces</a> of another object it owns. Formally, this is more similar to <a href="Composition_(object-oriented_programming)" class="mw-redirect" title="Composition (object-oriented programming)">composition</a> or <a href="Encapsulation_(object-oriented_programming)" class="mw-redirect" title="Encapsulation (object-oriented programming)">encapsulation</a> than aggregation. However, instead of implementing the exported interfaces by calling the interfaces of the owned object, the interfaces of the owned object themselves are exported. The owned object is responsible for assuring that methods of those interfaces inherited from <style data-mw-deduplicate="TemplateStyles:r886049734">
/* start https://en.wikipedia.org/ */
.mw-parser-output .monospaced{font-family:monospace,monospace}
/* end https://en.wikipedia.org/ */
</style><span class="monospaced"><a href="IUnknown" title="IUnknown">IUnknown</a></span> actually invoke the corresponding methods of the owner. This is to guarantee that the reference count of the owner is correct and all interfaces of the owner are accessible through the exported interface, while no other (private) interfaces of the owned object are accessible.<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="Special_forms">Special forms</h2></div>
<div class="mw-heading mw-heading3"><h3 id="Containment">Containment</h3></div>
<div role="note" class="hatnote navigation-not-searchable">Main article: <a href="Container_(abstract_data_type)" title="Container (abstract data type)">Container (abstract data type)</a></div>
<p>Composition that is used to store several instances of the composited data type is referred to as containment. Examples of such containers are <a href="Array_(data_structure)" title="Array (data structure)">arrays</a>, <a href="Associative_array" title="Associative array">associative arrays</a>, <a href="Binary_tree" title="Binary tree">binary trees</a>, and <a href="Linked_list" title="Linked list">linked lists</a>.
</p><p>In <a href="Unified_Modeling_Language" title="Unified Modeling Language">UML</a>, containment is depicted with a multiplicity of 0..* or 1..*, indicating that the composite object is composed of an unknown number of instances of the composed class.
</p>
<div class="mw-heading mw-heading3"><h3 id="Recursive_composition">Recursive composition</h3></div>
<p>Objects can be composed recursively, and their type is then called <a href="Recursive_type" class="mw-redirect" title="Recursive type">recursive type</a>. Examples includes various kinds of <a href="Tree_(data_structure)" class="mw-redirect" title="Tree (data structure)">trees</a>, <a href="Directed_acyclic_graph" title="Directed acyclic graph">DAGs</a>, and <a href="Graph_(abstract_data_type)" title="Graph (abstract data type)">graphs</a>. Each node in a tree may be a branch or leaf; in other words, each node is a tree at the same time when it belongs to another tree.
</p><p>In UML, recursive composition is depicted with an association, aggregation or composition of a class with itself.
</p>
<div class="mw-heading mw-heading3"><h3 id="Composite_pattern">Composite pattern</h3></div>
<p>The <a href="Composite_pattern" title="Composite pattern">composite design pattern</a> is an object-oriented design based on composite types, that combines recursive composition and containment to implement complex part-whole hierarchies.
</p>
<div class="mw-heading mw-heading2"><h2 id="Composite_types_in_C">Composite types in C</h2></div>
<p>This is an example of composition in <a href="C_(programming_language)" title="C (programming language)">C</a>.
</p>
<div class="mw-highlight mw-highlight-lang-c mw-content-ltr" dir="ltr"><pre><span class="k">struct</span><span class="w"> </span><span class="nc">Person</span>
<span class="p">{</span>
<span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">age</span><span class="p">;</span>
<span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">name</span><span class="p">[</span><span class="mi">20</span><span class="p">];</span>
<span class="w"> </span><span class="k">enum</span><span class="w"> </span><span class="p">{</span><span class="n">job_seeking</span><span class="p">,</span><span class="w"> </span><span class="n">professional</span><span class="p">,</span><span class="w"> </span><span class="n">non_professional</span><span class="p">,</span><span class="w"> </span><span class="n">retired</span><span class="p">,</span><span class="w"> </span><span class="n">student</span><span class="p">}</span><span class="w"> </span><span class="n">employment</span><span class="p">;</span>
<span class="p">};</span>
</pre></div>
<p>In this example, the primitive (noncomposite) types <span class="monospaced">int</span>, <span class="monospaced">enum {job_seeking, professional, non_professional, retired, student</span>} and the composite array type <span class="monospaced">char[]</span> are combined to form the composite structure <span class="monospaced">Person</span>. Each <span class="monospaced">Person</span> structure then "has an" age, name, and an employment type.
</p>
<div class="mw-heading mw-heading2"><h2 id="Timeline_of_composition_in_various_languages">Timeline of composition in various languages</h2></div>
<p><a href="C_(programming_language)" title="C (programming language)">C</a> calls a record a <a href="Struct_(C_programming_language)" title="Struct (C programming language)">struct</a> or structure; <a href="Object-oriented_programming" title="Object-oriented programming">object-oriented</a> languages such as <a href="Java_(programming_language)" title="Java (programming language)">Java</a>, <a href="Smalltalk" title="Smalltalk">Smalltalk</a>, and <a href="C%2B%2B" title="C++">C++</a> often keep their records hidden inside <a href="Object_(computer_science)" title="Object (computer science)">objects</a> (<a href="Class_(computer_science)" class="mw-redirect" title="Class (computer science)">class</a> instances); languages in the <a href="ML_programming_language" class="mw-redirect" title="ML programming language">ML</a> family simply call them records. <a href="COBOL" title="COBOL">COBOL</a> was the first widespread <a href="Programming_language" title="Programming language">programming language</a> to support records directly;<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup> <a href="ALGOL_68" title="ALGOL 68">ALGOL 68</a> got it from COBOL and <a href="Pascal_programming_language" class="mw-redirect" title="Pascal programming language">Pascal</a> got it, more or less indirectly, from ALGOL 68. <a href="Common_Lisp" title="Common Lisp">Common Lisp</a> provides structures and classes (the latter via the <a href="Common_Lisp_Object_System" title="Common Lisp Object System">Common Lisp Object System</a>).
</p>
<dl><dt>1959 – COBOL</dt></dl>
<div class="mw-highlight mw-highlight-lang-cobol mw-content-ltr" dir="ltr"><pre><span class="c"> </span><span class="mi">01 </span><span class="nv">customer-record</span><span class="p">.</span>
<span class="c"> </span><span class="w"> </span><span class="mi">03 </span><span class="nv">customer-number</span><span class="w"> </span><span class="kt">pic 9(8)</span><span class="w"> </span><span class="kt">comp</span><span class="p">.</span>
<span class="c"> </span><span class="w"> </span><span class="mi">03 </span><span class="nv">customer-name</span><span class="p">.</span>
<span class="c"> </span><span class="w"> </span><span class="mi">05 </span><span class="nv">given-names</span><span class="w"> </span><span class="kt">pic x(15)</span><span class="p">.</span>
<span class="c"> </span><span class="w"> </span><span class="mi">05 </span><span class="nv">initial-2</span><span class="w"> </span><span class="kt">pic x</span><span class="p">.</span>
<span class="c"> </span><span class="w"> </span><span class="mi">05 </span><span class="nv">surname</span><span class="w"> </span><span class="kt">pic x(15)</span><span class="p">.</span>
<span class="c"> </span><span class="w"> </span><span class="mi">03 </span><span class="nv">customer-address</span><span class="p">.</span>
<span class="c"> </span><span class="w"> </span><span class="mi">05 </span><span class="nv">street</span><span class="p">.</span>
<span class="c"> </span><span class="w"> </span><span class="mi">07 </span><span class="nv">street-name</span><span class="w"> </span><span class="kt">pic x(15)</span><span class="p">.</span>
<span class="c"> </span><span class="w"> </span><span class="mi">09 </span><span class="nv">house-number</span><span class="w"> </span><span class="kt">pic 999</span><span class="w"> </span><span class="kt">comp</span><span class="p">.</span>
<span class="c"> </span><span class="w"> </span><span class="mi">05 </span><span class="nv">city</span><span class="w"> </span><span class="kt">pic x(10)</span><span class="p">.</span>
<span class="c"> </span><span class="w"> </span><span class="mi">05 </span><span class="nv">country-code</span><span class="w"> </span><span class="kt">pic x(3)</span><span class="p">.</span>
<span class="c"> </span><span class="w"> </span><span class="mi">05 </span><span class="nv">postcode</span><span class="w"> </span><span class="kt">pic x(8)</span><span class="p">.</span>
<span class="c"> </span><span class="w"> </span><span class="mi">03 </span><span class="nv">amount-owing</span><span class="w"> </span><span class="kt">pic 9(8)</span><span class="w"> </span><span class="kt">comp</span><span class="p">.</span>
</pre></div>
<dl><dt>1960 – ALGOL 60</dt></dl>
<p>Arrays were the only <a href="Composite_data_type" title="Composite data type">composite data type</a> in <a href="Algol_60" class="mw-redirect" title="Algol 60">Algol 60</a>.
</p>
<dl><dt>1964 – PL/I</dt></dl>
<pre>dcl 1 newtypet based (P);
2 (a, b, c) fixed bin(31),
2 (i, j, k) float,
2 r ptr;
allocate newtypet;
</pre>
<dl><dt>1968 – ALGOL 68</dt></dl>
<pre>int max = 99;
mode newtypet = [0..9] [0..max]struct (
long real a, b, c, short int i, j, k, ref real r
);
newtypet newarrayt = (1, 2, 3, 4, 5, 6, heap real := 7)
</pre>
<p>For example, a linked list might be declared as:
</p>
<pre>mode node = union (real, int, compl, string),
list = struct (node val, ref list next);
</pre>
<p>For ALGOL 68 only the type name appears to the left of the equality, and most notably the construction is made – and can be read – from left to right without regard to priorities.
</p>
<dl><dt>1970 – Pascal</dt></dl>
<div class="mw-highlight mw-highlight-lang-pascal mw-content-ltr" dir="ltr"><pre><span class="k">type</span>
<span class="w"> </span><span class="n">a</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">array</span><span class="w"> </span><span class="p">[</span><span class="mi">1</span><span class="o">..</span><span class="mi">10</span><span class="p">]</span><span class="w"> </span><span class="k">of</span><span class="w"> </span><span class="kt">integer</span><span class="o">;</span>
<span class="w"> </span><span class="n">b</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">record</span>
<span class="w"> </span><span class="n">a</span><span class="o">,</span><span class="w"> </span><span class="n">b</span><span class="o">,</span><span class="w"> </span><span class="n">c</span><span class="o">:</span><span class="w"> </span><span class="kt">real</span><span class="o">;</span>
<span class="w"> </span><span class="n">i</span><span class="o">,</span><span class="w"> </span><span class="n">j</span><span class="o">,</span><span class="w"> </span><span class="n">k</span><span class="o">:</span><span class="w"> </span><span class="kt">integer</span><span class="o">;</span>
<span class="w"> </span><span class="k">end</span><span class="o">;</span>
</pre></div>
<dl><dt>1972 – <a href="C_(programming_language)#K&R_C" title="C (programming language)">K&R C</a></dt></dl>
<div class="mw-highlight mw-highlight-lang-c mw-content-ltr" dir="ltr"><pre><span class="cp">#define max 99</span>
<span class="k">struct</span><span class="w"> </span><span class="nc">newtypet</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">a</span><span class="p">,</span><span class="w"> </span><span class="n">b</span><span class="p">,</span><span class="w"> </span><span class="n">c</span><span class="p">;</span>
<span class="w"> </span><span class="kt">float</span><span class="w"> </span><span class="n">r</span><span class="p">;</span>
<span class="w"> </span><span class="kt">short</span><span class="w"> </span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="n">j</span><span class="p">,</span><span class="w"> </span><span class="n">k</span><span class="p">;</span>
<span class="p">}</span><span class="w"> </span><span class="n">newarrayt</span><span class="p">[</span><span class="mi">10</span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="n">max</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">];</span>
</pre></div>
<dl><dt>1977 – FORTRAN 77</dt></dl>
<p>Fortran 77 has arrays, but lacked any formal record/structure definitions. Typically compound structures were built up using <span class="monospaced">EQUIVALENCE</span> or <span class="monospaced">COMMON</span> statements:
</p>
<div class="mw-highlight mw-highlight-lang-fortran mw-content-ltr" dir="ltr"><pre><span class="w"> </span><span class="kt">CHARACTER </span><span class="n">NAME</span><span class="o">*</span><span class="mi">32</span><span class="p">,</span><span class="w"> </span><span class="n">ADDR</span><span class="o">*</span><span class="mi">32</span><span class="p">,</span><span class="w"> </span><span class="n">PHONE</span><span class="o">*</span><span class="mi">16</span>
<span class="w"> </span><span class="kt">REAL </span><span class="n">OWING</span>
<span class="w"> </span><span class="k">COMMON</span><span class="w"> </span><span class="o">/</span><span class="n">CUST</span><span class="o">/</span><span class="n">NAME</span><span class="p">,</span><span class="w"> </span><span class="n">ADDR</span><span class="p">,</span><span class="w"> </span><span class="n">PHONE</span><span class="p">,</span><span class="w"> </span><span class="n">OWING</span>
</pre></div>
<dl><dt>1983 – Ada</dt></dl>
<div class="mw-highlight mw-highlight-lang-ada mw-content-ltr" dir="ltr"><pre><span class="kd">type</span> <span class="kt">Cust</span> <span class="kr">is</span>
<span class="kr">record</span>
<span class="n">Name</span> <span class="p">:</span> <span class="n">Name_Type</span><span class="p">;</span>
<span class="n">Addr</span> <span class="p">:</span> <span class="n">Addr_Type</span><span class="p">;</span>
<span class="n">Phone</span> <span class="p">:</span> <span class="n">Phone_Type</span><span class="p">;</span>
<span class="n">Owing</span> <span class="p">:</span> <span class="kt">Integer</span> <span class="kr">range</span> <span class="mf">1.</span><span class="p">.</span><span class="mi">999999</span><span class="p">;</span>
<span class="kr">end record</span><span class="p">;</span>
</pre></div><p>Ada 95 brought OOP concepts through tagged types (the equivalent of a C++ class), Ada 2012 added support for <a href="Liskov_substitution_principle" title="Liskov substitution principle">substitution</a> verification through class-wide contracts.
</p><dl><dt>1983 – C++</dt></dl>
<div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span class="k">const</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">max</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">99</span><span class="p">;</span>
<span class="k">class</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="k">public</span><span class="o">:</span>
<span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">a</span><span class="p">,</span><span class="w"> </span><span class="n">b</span><span class="p">,</span><span class="w"> </span><span class="n">c</span><span class="p">;</span>
<span class="w"> </span><span class="kt">float</span><span class="w"> </span><span class="o">&</span><span class="n">r</span><span class="p">;</span>
<span class="w"> </span><span class="kt">short</span><span class="w"> </span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="n">j</span><span class="p">,</span><span class="w"> </span><span class="n">k</span><span class="p">;</span>
<span class="p">}</span><span class="n">newtypet</span><span class="p">[</span><span class="mi">10</span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="n">max</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">];</span>
</pre></div>
<dl><dt>1991 – Python</dt></dl>
<div class="mw-highlight mw-highlight-lang-python mw-content-ltr" dir="ltr"><pre><span class="nb">max</span> <span class="o">=</span> <span class="mi">99</span>
<span class="k">class</span><span class="w"> </span><span class="nc">NewTypeT</span><span class="p">:</span>
<span class="k">def</span><span class="w"> </span><span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">a</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">b</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">c</span> <span class="o">=</span> <span class="mi">0</span>
<span class="bp">self</span><span class="o">.</span><span class="n">i</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">j</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">k</span> <span class="o">=</span> <span class="mf">0.0</span>
<span class="c1"># Initialise an example array of this class.</span>
<span class="n">newarrayt</span> <span class="o">=</span> <span class="p">[[</span><span class="n">NewTypeT</span><span class="p">()</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">max</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)]</span> <span class="k">for</span> <span class="n">j</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">10</span><span class="p">)]</span>
</pre></div>
<dl><dt>1992 – FORTRAN 90</dt></dl>
<p>Arrays and strings were inherited from FORTRAN 77, and a new reserved word was introduced: <b>type</b>
</p>
<div class="mw-highlight mw-highlight-lang-fortran mw-content-ltr" dir="ltr"><pre><span class="k">type </span><span class="n">newtypet</span>
<span class="w"> </span><span class="kt">double precision </span><span class="n">a</span><span class="p">,</span><span class="w"> </span><span class="n">b</span><span class="p">,</span><span class="w"> </span><span class="n">c</span>
<span class="w"> </span><span class="kt">integer</span><span class="o">*</span><span class="mi">2</span><span class="w"> </span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="n">j</span><span class="p">,</span><span class="w"> </span><span class="n">k</span>
<span class="o">*</span><span class="w"> </span><span class="n">No</span><span class="w"> </span><span class="k">pointer type </span><span class="n">REF</span><span class="w"> </span><span class="kt">REAL </span><span class="n">R</span>
<span class="w"> </span><span class="k">end type</span>
<span class="k">type</span><span class="w"> </span><span class="p">(</span><span class="n">newtypet</span><span class="p">)</span><span class="w"> </span><span class="n">t</span><span class="p">(</span><span class="mi">10</span><span class="p">,</span><span class="w"> </span><span class="mi">100</span><span class="p">)</span>
</pre></div>
<p>FORTRAN 90 updated and included <a href="FORTRAN_IV" class="mw-redirect" title="FORTRAN IV">FORTRAN IV</a>'s concept called NAMELIST.
</p>
<div class="mw-highlight mw-highlight-lang-fortran mw-content-ltr" dir="ltr"><pre><span class="kt">INTEGER</span><span class="w"> </span><span class="kd">::</span><span class="w"> </span><span class="n">jan</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="n">feb</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="n">mar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="n">apr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">4</span>
<span class="k">NAMELIST</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="n">week</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="n">jan</span><span class="p">,</span><span class="w"> </span><span class="n">feb</span><span class="p">,</span><span class="w"> </span><span class="n">mar</span><span class="p">,</span><span class="w"> </span><span class="n">apr</span>
</pre></div>
<dl><dt>1994 – ANSI <a href="Common_Lisp" title="Common Lisp">Common Lisp</a></dt></dl>
<p>Common Lisp provides structures and the ANSI Common Lisp standard added CLOS classes.
</p>
<div class="mw-highlight mw-highlight-lang-lisp mw-content-ltr" dir="ltr"><pre><span class="p">(</span><span class="nb">defclass</span><span class="w"> </span><span class="nv">some-class</span><span class="w"> </span><span class="p">()</span>
<span class="w"> </span><span class="p">((</span><span class="nv">f</span><span class="w"> </span><span class="ss">:type</span><span class="w"> </span><span class="nb">float</span><span class="p">)</span>
<span class="w"> </span><span class="p">(</span><span class="nv">i</span><span class="w"> </span><span class="ss">:type</span><span class="w"> </span><span class="nc">integer</span><span class="p">)</span>
<span class="w"> </span><span class="p">(</span><span class="nv">a</span><span class="w"> </span><span class="ss">:type</span><span class="w"> </span><span class="p">(</span><span class="nc">array</span><span class="w"> </span><span class="nc">integer</span><span class="w"> </span><span class="p">(</span><span class="mi">10</span><span class="p">)))))</span>
</pre></div>
<p>For more details about composition in C/C++, see <a href="Composite_type" class="mw-redirect" title="Composite type">Composite type</a>.
</p>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<ul><li><a href="C%2B%2B_structure" class="mw-redirect" title="C++ structure">C++ structure</a></li>
<li><a href="Composite_type" class="mw-redirect" title="Composite type">Composite type</a></li>
<li><a href="Composition_over_inheritance" title="Composition over inheritance">Composition over inheritance</a></li>
<li><a href="Delegation_(programming)" class="mw-redirect" title="Delegation (programming)">Delegation (programming)</a></li>
<li><a href="Function_composition_(computer_science)" title="Function composition (computer science)">Function composition (computer science)</a></li>
<li><a href="Has-a" title="Has-a">Has-a</a></li>
<li><a href="Implementation_inheritance" class="mw-redirect" title="Implementation inheritance">Implementation inheritance</a></li>
<li><a href="Inheritance_semantics" class="mw-redirect" title="Inheritance semantics">Inheritance semantics</a></li>
<li><a href="Law_of_Demeter" title="Law of Demeter">Law of Demeter</a></li>
<li><a href="Object-oriented_analysis_and_design" title="Object-oriented analysis and design">Object-oriented analysis and design</a></li>
<li><a href="Virtual_inheritance" title="Virtual inheritance">Virtual inheritance</a></li></ul>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */
.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}
/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap"><ol class="references">
<li id="cite_note-Yaiser-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-Yaiser_1-0">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */
.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}
/* end https://en.wikipedia.org/ */
</style><cite id="CITEREFYaiser" class="citation web cs1">Yaiser, Michelle. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20150408185639/http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html">"Object-oriented programming concepts: Composition and aggregation"</a>. Archived from <a rel="nofollow" class="external text" href="http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html">the original</a> on April 8, 2015. <q>There is a closely related concept to composition called aggregation. In conversation the differences between composition and aggregation are often ignored.</q></cite></span>
</li>
<li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><cite class="citation book cs1"><i>Design patterns : elements of reusable object-oriented software</i>. Gamma, Erich., Helm, Richard (Computer scientist), Johnson, Ralph E., 1955-, Vlissides, John. Reading, Mass.: Addison-Wesley. 1995. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>0-201-63361-2</bdi>. <a href="OCLC_(identifier)" class="mw-redirect" title="OCLC (identifier)">OCLC</a> <a rel="nofollow" class="external text" href="https://search.worldcat.org/oclc/31171684">31171684</a>.</cite><span class="cs1-maint citation-comment"><code class="cs1-code">{{cite book}}</code>: CS1 maint: others (link)</span></span>
</li>
<li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text"><cite id="CITEREFOstermannMezini2001" class="citation journal cs1">Ostermann, Klaus; Mezini, Mira (October 1, 2001). <span class="id-lock-subscription" title="Paid subscription required"><a rel="nofollow" class="external text" href="https://doi.org/10.1145/504311.504303">"Object-oriented composition untangled"</a></span>. <i>ACM SIGPLAN Notices</i>. <b>36</b> (11): <span class="nowrap">283–</span>299. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1145%2F504311.504303">10.1145/504311.504303</a>. <a href="ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a> <a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/0362-1340">0362-1340</a>.</cite></span>
</li>
<li id="cite_note-:0-4"><span class="mw-cite-backlink">^ <a href="#cite_ref-:0_4-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-:0_4-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFOMG2017" class="citation web cs1">OMG (2017). <a rel="nofollow" class="external text" href="https://www.omg.org/spec/UML/About-UML/">"Unified Modeling Language Specification Version 2.5.1"</a>. <i>www.omg.org</i>. p. 109-110,197-201<span class="reference-accessdate">. Retrieved <span class="nowrap">October 4,</span> 2020</span>.</cite></span>
</li>
<li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://msdn2.microsoft.com/en-us/library/ms686558.aspx">"Aggregation"</a>. <i>Platform SDK for Windows XP SP2</i>. Microsoft<span class="reference-accessdate">. Retrieved <span class="nowrap">November 4,</span> 2007</span>.</cite></span>
</li>
<li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><cite id="CITEREFSebesta1996" class="citation book cs1">Sebesta, Robert W. (1996). <span class="id-lock-registration" title="Free registration required"><a rel="nofollow" class="external text" href="https://archive.org/details/conceptsofprogra00sebe/page/218"><i>Concepts of Programming Languages</i></a></span> (Third ed.). Addison-Wesley Publishing Company, Inc. p. <a rel="nofollow" class="external text" href="https://archive.org/details/conceptsofprogra00sebe/page/218">218</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>0-8053-7133-8</bdi>.</cite></span>
</li>
</ol></div></div>
<div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2></div>
<ul><li><a rel="nofollow" class="external text" href="http://ootips.org/uml-hasa.html">Association, Aggregation and Composition</a>, accessed in February 2009</li>
<li>Harald Störrle, UML2, Addison-Wesley, 2005</li></ul></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-08-06" href="https://en.wikipedia.org/wiki/?title=Object_composition&oldid=1304461139">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
</body></html>